package com.nlx.notes.module.bean.dto;

import com.nlx.notes.module.bean.BaseDTO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
public class PageBaseQueryDTO extends BaseDTO {

    /**
     * 需要查询的页码
     */
    private long page = 1L;

    /**
     * 每页展示多少条
     */
    private long pageSize = 5L;

    private long offset = 0L;

    /**
     * 用于分页查询的记录 id
     */
    private long maxId = 0;

    private Long userId;

    public long getOffset() {
        return (page -1) * pageSize;
    }
}
